/*********************************************************
          File Name:12.14.cpp
          Author: Abby Cin
          Mail: abbytsing@gmail.com
          Created Time: Tue 15 Sep 2015 05:35:52 PM CST
**********************************************************/

#include <iostream>
#include <memory>


void end_connection(int *a)
{
        std::cout << "delete.." << std::endl;
        delete a;
}

int main()
{
        int *a = new int(1);
        std::cout << *a << std::endl;

        std::shared_ptr<int> p(a, end_connection);

        return 0;
}
